1. Field of the Invention
This invention relates to a motion-compensated coder, a decoder, a method of motion-compensated coding, and a method of decoding.
2. Description of the Prior Art
A motion compensated coder for motion-compensated-coding video data is known and a decoder for decoding the motion-compensated-coded video data is also known.
The motion compensation is generally effected every unit of 16.times.16 pixels to 8.times.8 pixels. The motion of an image, i.e., the motion vector is obtained at the same unit. An accuracy of the motion vector(MV) is generally one or a half pixel. If the motion compensation is used in coding, the motion vector is coded and sent to the decoder side.
FIG. 7 is a block diagram of a prior art motion-compensated coder.
Input video data is supplied to a subtractor 2 and to a motion estimator 71 through an input terminal 1. The subtractor 2 subtracts a motion-compensated-predicted signal 10a from the input video data and supplies the difference as a prediction error to a DCT (Discrete Cosine Transform) 3.
The DCT 3 effects a discrete cosine transforming process at 8.times.8 pixels and supplies the obtained coefficients to a quantizer 4. The quantizer 4 quantizes the coefficients with predetermined step amount and outputs a fixed length coded coefficients to the variable length coder 5 and to an inverse quantizer 9.
Generally, the quantizing step amount is controlled in accordance with an amount of codes to keep the data rate constant.
The variable length coder 5 converts coefficients of two dimensional 8.times.8 pixels into one dimensional array through zigzag scanning and codes the coefficients by Huffman coding. This inter-frame prediction error signal is multiplexed with coded motion vectors by a multiplexer 14.
On the other hand, inverse processes of the DCT 3 and the quantizer 4 are executed by the inverse quantizer 9, an inverse DCT 13 to reproduce the inter-frame prediction error. The reproduced prediction error is added to motion-compensated-predicted signal 10a to provide a reproduced video data which is stored in a video memory 73.
Reproduced video from the video memory 73 is supplied to the motion estimator 71 and to a motion-compensated predictor 72. The processing from the inverse quantizer 9 to the video memory 73 is called as local decoding which is essentially the same processing of the corresponding decoder.
The motion-compensated predictor 72 shifts video data stored in the video memory 73 every block in accordance with the motion vectors from the motion estimator 71 to obtain a motion-compensated-predicted signal 10a which is supplied to the subtractor 2 and to the adder 12.
The motion estimator 71 effects block matching between the reproduced video data stored in the video memory 73 and the input video data with the reproduced video data shifted every motion compensation block and determines the motion vector MV showing best matching (lowest error). The obtained motion vector is supplied to a motion vector coder 74 for coding the motion vector and to the motion-compensated predictor 72.
The motion vector coder 74 obtains a difference between horizontal components of the motion vectors at the one block previous block (generally left) and the present block and a difference between vertical components of the motion vectors at the one block previous block (generally left) and the present block and codes the difference values with Huffman codes to supply the obtained code train (bit stream) of the motion vector to the multiplexer 14 which multiples the code train (bit stream) of the motion vector with the code train (bit stream) of the inter-frame prediction error signal, i.e., the output of the variable length coder 5 to output coded signal 15.
FIG. 8 is a block diagram of a prior art decoder corresponding to the motion-compensated prediction coder shown in FIG. 7.
The coded signal 15 is inputted from an input 21 and supplied to a separator 22 which separates the coded signal into the code train of the inter-frame prediction error and the code train of the motion vectors. The inter-frame prediction error is converted into the fixed length code by a variable length decoder 23 which outputs 8.times.8 pixels of coefficients which are supplied to an inverse quantizer 9. The inverse quantizer 9 and an inverse DCT 13 outputs reproduced prediction errors. On the other hand, the code train of the motion vectors is supplied to a motion vector decoder 81 which decodes the code train of the motion vectors and supplies the obtained motion vector data to a motion-compensated predictor 82. The motion-compensated predictor 82 generates inter-frame prediction signal with the video data stored in a video memory 83 motion-compensated in accordance with the motion vector data from the motion vector decoder 81. The adder 12 adds the inter-frame prediction error signal to the reproduced prediction errors to output reproduced video data 124 which is stored in the video memory 83. The adder 12, the inverse quantizer 9, and the inverse DCT 13 in FIG. 8 have the same structure as those shown in FIG. 7 respectively.
In these prior art motion-compensated prediction coder and motion-compensated prediction decoder, the accuracy of the motion vector is fixed. Therefore, in the case of the image showing a low self-correlation (there is a lot of amounts of high frequency component), it is possible to make the prediction error low by the high accuracy motion prediction. However, in the case of the image showing high self-correlation (there is a few amount of high frequency component) the high accuracy motion compensation prediction does not contribute to reduction in the prediction error, so that the motion vector data is not efficiently used.